<% view :chat_view do %>

<% split_view :chat_split_view, :direction => :horizontal do %>

<% view :chat_main, :min_thickness => 200, :can_collapse => false do %>
	<% scroll_view :chat_history_scroll_view do %>
		<% view :chat_history_view do %>
		<% end %>
	<% end %>
	<div id="chat_message">
		<% form_view :chat_form do %>
		<table><tr><td class="msg">
			<%= text_field_view :chat_message, :class => 'new_message',
						:hint => loc(%(Chat_Enter)) %>
		</td><td>
			<%= button_view :send_button, :class => 'send_button',
							:label => loc(%(Chat_Send)), :default => true,
							:enabled => true, :action => 'Frontend.chatController.send' %>
		</td></tr></table>
		<% end %>
	</div>
<% end %>

<%= split_divider_view :chat_splitter %>

<% scroll_view :userlist_scroll_view, :min_thickness => 90 do %>
	<%= list_view :userlist_view,
		:example_view => 'Frontend.UserListItemView',
		:content_value_key => 'nick', :content_icon_key => 'icon',
		:action => 'Frontend.privateMessageController.sendPM',
		:bind => {
			:content => 'Frontend.userlistController.arrangedObjects',
			:selection => 'Frontend.userlistController.selection'
		} %>
<% end %>

<% end %>

<div id="tools">
	<ul>
		<li id="tool_sendpm">
			<a href="javascript: Frontend.privateMessageController.sendPM();">
				<%= loc(%(User_Send_PM)) %>
			</a>
		</li>
		<li id="tool_privatechat">
			<a href="javascript: Frontend.chatController.startChatWithUser();">
				<%= loc(%(User_Private_Chat)) %>
			</a>
		</li>
		<li id="tool_userinfo">
			<a href="javascript: Frontend.userlistController.getUserInfo();">
				<%= loc(%(User_Get_Info)) %>
			</a>
		</li>
		<li id="tool_changename">
			<a href="javascript: Frontend.chatController.showChangeNickDialog();">
				<%= loc(%(User_Change_Name)) %>
			</a>
		</li>
	</ul>
</div>
<% end %>
